package com.ylx.pojo;

public class CartItem {
	private Goods goods;
	private int buyNum;
	private double subTotal;
	public Goods getGoods() {
		return goods;
	}
	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	public int getBuyNum() {
		return buyNum;
	}
	public void setBuyNum(int buyNum) {
		this.buyNum = buyNum;
	}
	public int getSubTotal() {
		return goods.getPrice()*this.buyNum;
	}

	@Override
	public String toString() {
		return "CartItem [goods=" + goods + ", buyNum=" + buyNum + ", subTotal=" + subTotal + "]";
	}



}
